//
//  ViewController.m
//  10507browser
//
//  Created by student on 16/2/19.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "ViewController.h"

@interface ViewController () 

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)leftbtnchange:(UIButton *)sender
{
    int a = [self.leftlabel.text intValue];
    if (a>=1 && a<=5)
    {
        a -= 1;
        switch (a)
        {
            case 1:
                self.iview.image = [UIImage imageNamed:@"biaoqingdi"];
                self.wordlabel.text = @"你愁啥";
                self.leftlabel.text = @"1";
                break;
            case 2:
                self.iview.image = [UIImage imageNamed:@"bingli"];
                self.wordlabel.text = @"难怪别人老说我嘴臭！！！";
                self.leftlabel.text = @"2";
                break;
            case 3:
                self.iview.image = [UIImage imageNamed:@"chiniupa"];
                self.wordlabel.text = @"老子信了你的邪，搞不定你浓";
                self.leftlabel.text = @"3";
                break;
            case 4:
                self.iview.image = [UIImage imageNamed:@"danteng"];
                self.wordlabel.text = @"总感觉下面隐隐作痛";
                self.leftlabel.text = @"4";
                break;
            case 5:
                self.iview.image = [UIImage imageNamed:@"wangba"];
                self.wordlabel.text = @"脑补内容";
                self.leftlabel.text = @"5";
                break;
            default:
                break;
        }
    }
}

- (IBAction)rightbtn:(UIButton *)sender
{
    int a = [self.leftlabel.text intValue];
    if (a>=1 && a<=5)
    {
        a += 1;
        switch (a)
        {
            case 1:
                self.iview.image = [UIImage imageNamed:@"biaoqingdi"];
                self.wordlabel.text = @"你愁啥";
                self.leftlabel.text = @"1";
                break;
            case 2:
                self.iview.image = [UIImage imageNamed:@"bingli"];
                self.wordlabel.text = @"难怪别人老说我嘴臭！！！";
                self.leftlabel.text = @"2";
                break;
            case 3:
                self.iview.image = [UIImage imageNamed:@"chiniupa"];
                self.wordlabel.text = @"老子信了你的邪，搞不定你浓";
                self.leftlabel.text = @"3";
                break;
            case 4:
                self.iview.image = [UIImage imageNamed:@"danteng"];
                self.wordlabel.text = @"总感觉下面隐隐作痛";
                self.leftlabel.text = @"4";
                break;
            case 5:
                self.iview.image = [UIImage imageNamed:@"wangba"];
                self.wordlabel.text = @"脑补内容";
                self.leftlabel.text = @"5";
                break;
            default:
                break;
        }
    }
}

@end
